"use strict";

const Ws = require("ws");
const Utils = require("./utils");

const Logger = require("pomelo-logger").getLogger("Client", process.pid, __filename);

let ws = new Ws("ws://127.0.0.1:1234/");
ws.on("open", () => {
    // ws.SendPacket(104, {
    //     "radian": 1.414,
    //     "rotation": 125,
    //     "x": 0.5, "y": 0.5
    // });
    ws.SendPacket(101, {
        "msgType": 12,
        "msgSize": 5
    });
});
ws.on("message", (data, flags) => {
    Logger.debug("client receive [ %j ]", Utils.decode(data));
});
